import json

import requests
from sympy import false

headers = {
    "Accept": "application/json, text/plain, */*",
    "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    "Cache-Control": "no-cache",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "Origin": "https://www.woolworths.com.au",
    "Pragma": "no-cache",
    "Referer": "https://www.woolworths.com.au/shop/browse/pet/pet-specials?pageNumber=3",
    "Request-Id": "|03693e20f7eb4916a2726569b9fd9e84.e4cf1a14a8c44e56",
    "Sec-Fetch-Dest": "empty",
    "Sec-Fetch-Mode": "cors",
    "Sec-Fetch-Site": "same-origin",
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0",
    "sec-ch-ua": "\"Chromium\";v=\"128\", \"Not;A=Brand\";v=\"24\", \"Microsoft Edge\";v=\"128\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "traceparent": "00-03693e20f7eb4916a2726569b9fd9e84-e4cf1a14a8c44e56-01"
}
cookies = {
    "AKA_A2": "A",
    "ai_user": "jmE99pcqaUzbS2Gdxl4t/6|2024-08-27T06:09:18.939Z",
    "akaalb_woolworths.com.au": "~op=www_woolworths_com_au_ZoneB:PROD-ZoneB|www_woolworths_com_au_BFF_MEL_Launch:WOW-BFF-MEL|~rv=16~m=PROD-ZoneB:0|WOW-BFF-MEL:0|~os=43eb3391333cc20efbd7f812851447e6~id=9af1c7a4b17e0b4bdb3ff18e2a1d4fba",
    "INGRESSCOOKIE": "1724738961.876.50.585622|37206e05370eb151ee9f1b6a1c80a538",
    "w-rctx": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE3MjQ3Mzg5NjAsImV4cCI6MTcyNDc0MjU2MCwiaWF0IjoxNzI0NzM4OTYwLCJpc3MiOiJXb29sd29ydGhzIiwiYXVkIjoid3d3L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LMvJTX5lBxiCgYgJGHAmyqh7jFKWle625pOZAbHxtUOP3E65-dLXZUph0SHe03oRlOe3R0eqS2POWFopXQzkNi_MD1-CN1FPyHVABTuXY3edJViQhay9P3nYJ93cA",
    "prodwow-auth-token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE3MjQ3Mzg5NjAsImV4cCI6MTcyNDc0MjU2MCwiaWF0IjoxNzI0NzM4OTYwLCJpc3MiOiJXb29sd29ydGhzIiwiYXVkIjoid3d3Lndvb2x3b3J0aHMuY29tLmF1Iiwic2lkIjoiMCIsInVpZCI6ImE1ZjBmNTZlLTRjZTEtNDE3OC05M2ZjLTBjOTliODJhZWVmMSIsIm1haWQiOiIwIiwiYXV0IjoiU2hvcHBlciIsImF1YiI6IjAiLCJhdWJhIjoiMCIsIm1mYSI6IjEifQ.Qp2XJpLyEyjMhQLy-wvnDNzEyf-8w1Uj9r88dlHUcDWts9OGDQpbYOuVQHaFDUoflBHgMx-bAJMSWDTApJ-7kxCtMGuFgLyeaRu2AdYC8LhwYe0rvahCJkXy7PtwgLoT-NAamv-wIj5PYHI0FSXCEENILMKIEUjKasK6UG93csiDO6V350BPyiwpS_rCBoYPoY7BjKP_sOJlKQF4pAShd9MM5LMvJTX5lBxiCgYgJGHAmyqh7jFKWle625pOZAbHxtUOP3E65-dLXZUph0SHe03oRlOe3R0eqS2POWFopXQzkNi_MD1-CN1FPyHVABTuXY3edJViQhay9P3nYJ93cA",
    "at_check": "true",
    "fullstoryEnabled": "false",
    "bm_mi": "5A35DD4272BA1B7F6EEFF715EC874E88~YAAQFfAgFw/JeIyRAQAAQoZ1khhE8fo2HzQBYFMSEldqj7bQQg1vp4DkAfGUEvWr9ycV4GFOjdZQTbFfI+78MlmkjeWD5i+ATIF9mhIIZNCoboN4SRZfVm/TXkzJNH++f8avNHdXRAolZ7jxrazeNxPzKeaIBGzWdbqSzA6sxBHGdMsU09752sgGTzk5MnUBDS20CxVUIjCHQFGM2rOsvXJkisPdFmM/jtHiq6V0JD6yW7uDmYagoQvlngsOQRYTXi4MddhQY57LcbfSHUw1tKok7tjGHElD4EcDVT48ua0u8ihiwqXZCat9caa8tr/SIfQW4o9gb03O921ScEvl5aJ6QAFm8cQjOYPaIJNQBtQNrgk=~1",
    "bm_sv": "90E7B972A2DCE064A6711B61C00F4CB3~YAAQFfAgFw/NeIyRAQAAer11khhraSuwDDce5mgZ2iJOz31QKVK++BJEGlqw+FlvXrE10G4a6SCT5JJJSGqNLkj8JvqFMI0XmQIRJKecFdolppxVTZvA20eopRK8Yf3vD0RGqzPCA2LaLFhcpq3DxMFUDB8NCJRLV74/3JvSSaS3ujUSHFbflU38AcjNyzPuukv1YXLlpZiPxd5IVIi8ecS9FwcDGdU7DftYga98aTyJ5oLbM0ZrqBvHNlPh7pGlfsFjnyXXYfk=~1",
    "ak_bmsc": "9EE734E4547ACE1259CAA64B9C499BCE~000000000000000000000000000000~YAAQFfAgF5bNeIyRAQAAscR1khiU4qbNo43VSp/eAMXimU0WOxuTa0DduXAGkGh3G+AIXH16elEtTd8OFSj01M6yQzXl14BZb9c/9VFqp6u1uSTlczGh3WadcQv+xI4FZcct4Np2kFtb033tprReS2K2MNHhW/CvGKjQ6SkgVvMiFAUIp3iM3cV54XGBM766w5IT1vneti73E2uPIejL5UKr7gAV4x1Gi3r4lwBBNCFtZkKsdnbcQojYUi9MF+OSYOVQ6Dc7ailkTgUflbZn6eAu2aYQQSZW0wY9UkpfD6dSp7WTAM9OSLpTu5cZr1aodiMInbufVQWeOzncivFSmg70Eff96Wee/D5YWLUDzyoAgDyblPHdspUsB37qig4Y4Y2KoC9pqJzE5Hq43MdQ8rKYPIFKwytWZrlDeo0UkB4g8Bu0BdxByDRDOzNGJGWgJV+XG57dQw==",
    "_abck": "73A4423C7F55A95655CA0CC4229D88AB~0~YAAQn/ffF9O+hI6RAQAAA/qDkgy0LePZRX8heHyr4a45vZ0X6eTBDmibGTIJWTgQv0C1KUKCeuCjb1jV/1QHieBQyFKBtpgobrfy/Jjjeed+ZRaezEzO/hkFdxooOeMxGWH5OWVjmJS3bn8Nk6eZqh/4KZvKkxqnNI5q275kUQOIkXXLvVQv8x5FA6Zn5VsAO4GlJXxCv82+wwpx8ARDg0xjt6k15TOjm5GT2meCa2vQsDDOThTaBQNIsJsAorHX3uDc5X7Acsix/Kg2LsQXI2U+lwJOESl3TOpC1jn6x9YqBHqHLkSLs5zGrs91x9mTyfadTbdJUAsEDIcZK3HxQ+L9Trs4qiSVY29VC3oG27oNd5OHFi5CTIGD2e7FRX1Gk3RpAj8snPuUSFPmDolCo25S6GcWoXNCt8IzyOsv+aLM55uletzypukoWjrD8c4jRJ1q1UwA3Vmu8I0dQ646yW3/b3zno/Z47wA//g==~-1~||0||~1724742566",
    "bm_sz": "E3CEC290DB56E7DEC87D548086A85D2E~YAAQn/ffF/nChI6RAQAAD+aFkhg/3UEL+K/cNn+tOZaGW/9LgqNFRMFsBFVaLz8QBfFOpBZcsAm3Hy1Ls5bwVSHki8kDkKVaN5VdBUbh1aDizAkHz51/4LSLdhFNn5NAE/skkArklIaTz0aYI8io1u86i9qZfOT7/rMUJ/tpr6iqirSda75GoM6QixOXoPOWfYCrnhtvUFQ0p0wNP4lfMAX1SjXDdzjT2VyTpPwoEnrY7SaU/TnenGQnr83Hl313Nafb2B10HPwhcTMxyRYb6GkVkgAgPz0VFzVfwQxr+dHM27EVd4y3ou9EbTQfieGQ+nceVupGreyhxgxRzDta3ZlDwIsBEhv3knNLIXuyFgVgHW3UaxA5OX6QmudhjN/00ZPooCKtr3I5IdxEI6JBsL5YR1CZmOsYi/+ZdcDUaBtPiGlq9Y6nirvFaYB8BaQJhGS4laJ5BAZaDpUkWQxYsQh19j2uwyPSBRDw2dbquD2sXgkNG6QvY1pE5BPAPb1t1g==~3682616~4277810",
    "mbox": "session#8beda89104744d499fdab73cb702c0b7#1724741996",
    "ai_session": "lsJiDfkp7N93pXTHf0cfQv|1724738960080|1724740145365"
}
url = "https://www.woolworths.com.au/apis/ui/browse/category"
data = {
    "categoryId": "1_61D6FEB_SPECIALS",
    "pageNumber": 3,
    "pageSize": 36,
    "sortType": "TraderRelevance",
    "url": "/shop/browse/pet/pet-specials?pageNumber=3",
    "location": "/shop/browse/pet/pet-specials?pageNumber=3",
    "formatObject": "{\"name\":\"Pet Specials\"}",
    "isSpecial": True,
    "isBundle": False,
    "isMobile": False,
    "filters": [],
    "token": "",
    "gpBoost": 0,
    "isHideUnavailableProducts": False,
    "isRegisteredRewardCardPromotion": False,
    "enableAdReRanking": False,
    "groupEdmVariants": True,
    "categoryVersion": "v2"
}
data = json.dumps(data, separators=(',', ':'))
response = requests.post(url, headers=headers, cookies=cookies, data=data, verify=false)

print(response.text)
print(response)
